

from rest_framework.pagination import PageNumberPagination


class CommonPageNumberPagination(PageNumberPagination):
    page_size = 2   # 没页显示的调试
    page_query_param = 'page' # 第几页的查询参数
    # 定制传参
    page_size_query_param = 'page_size'
    max_page_size = 10 # 最大一页的数据

#http://127.0.0.1:8000/course/course/?page=3&size=3